import { Injectable } from '@angular/core';
import { Http, Response } from '@angular/http';

import 'rxjs/add/operator/toPromise';

@Injectable()
export class DealerService {

    constructor(private http: Http) { }

    getDealersList() {
        return this.http.get('assets/mock-data/dealer-list.json')
            .toPromise()
            .then(res => res.json().data)
            .then(data => { return data; });
    }
}